# -*- coding: utf-8 -*-
"""
@Time ： 2024/5/21 17:46
@Auth ： 李天天
"""
import os
import time
from Common.connect_to_device import d_one_device
from Common.handle_path import FIVED_LOGS_DIR


class FiveDLog:
    def create_5D_logger(self):
        curTime = time.strftime("%Y-%m-%d %H.%M.%S", time.localtime())
        log_filename = os.path.join(FIVED_LOGS_DIR, "5D_Player_{0}.log".format(curTime))
        # FiveDlogger = d_one_device.logcat(log_filename, clear=True, re_filter=".*(ArcAmbient|5D-SDK).*")
        FiveDlogger = d_one_device.logcat(log_filename, clear=True,
                                          re_filter=".*(ArcAmbient|ZkSeat|ZkConditioner|ZkFragance|ZkShow|5D-SDK|DefaultSeat|DefaultConditioner|DefaultFragance|DefaultShow).*")
        return FiveDlogger, log_filename
